#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() 
{
    int a, b;
    while (scanf("%d %d", &a, &b) != EOF) 
    { 
        int i = 0;
        int count = 0;
        for (i = 0; i < 32; i++)
        {
            int x = 0;
            int y = 0;
            if (a & 1 << i)
                x = 0;
            else
                x = 1;
            if (b & 1 << i)
                y = 0;
            else
                y = 1;
            if (x != y)
                count++;
        }
        printf("%d\n", count);
    }
    return 0;
}